<template>
  <view class="transition-page" v-if="show || showTrans">
    <view class="trans-content">
      <image class="trans-img" :src="logo" mode="aspectFill" />
      <view class="cover-img"></view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      showTrans: true
    };
  },
  created() {},
  mounted() {
    setTimeout(() => {
      this.showTrans = false;
    }, 300);
  },
  filters: {},
  computed: {
    logo: function () {
      if (this.$store.getters.stores.client_loading_logo) {
        return this.$store.getters.stores.client_loading_logo;
      }
      if (this.asyncImgs.diyNew) {
        return this.asyncImgs.diyNew.loading;
      }
    }
  },
  methods: {
    init() {
      this.showTrans = true;
      setTimeout(() => {
        this.showTrans = false;
      }, 300);
    }
  }
};
</script>

<style scoped lang="scss">
.transition-page {
  width: 100%;
  height: 100%;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 611;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  .trans-content {
    width: 14.67vw;
    height: 14.67vw;
    overflow: hidden;
    position: relative;
    .trans-img {
      width: 100%;
      height: 100%;
      display: block;
    }
    .cover-img {
      width: 100%;
      height: 20%;
      position: absolute;
      left: 0;
      bottom: -25%;
      z-index: 11;
      background-color: #ffffff;
      background-blend-mode: color-burn;
      filter: blur(8px);
      transform: rotate(150deg);
      animation: coverTopDowm 1s infinite;
    }
    @keyframes coverTopDowm {
      0% {
        bottom: -25%;
      }
      50% {
        bottom: 125%;
      }
      100% {
        bottom: -25%;
      }
    }
  }
}
</style>
